package qa.tools.commom.enums;


public enum ResponseCode {
    SUCCESS(0, "success"),

    Success(200, "success"),
    /**
     * 参数非法
     */
    IllegalArgument(201, "illegal argument"),
    /**
     * 参数不符合业务
     */
    InvalidArgument(202, "invalid argument"),
    /**
     * 业务错误
     */
    BusinessError(203, "business error"),

    NO_VALID_DATA(205, "NO VALID DATA"),

    /**
     * 未知错误
     */
    InternalError(204, "Internal error"),

    BATCH_OPERATE_ERROR(206, "batch operate error"),

    HTTP_API_ERROR(207, "thirdpart http interface error"),

    RESULT_NOT_MATCH(302, "PAY RESULT NOT MATCH"),
    CAN_NOT_CLEAR(208, "event betting status is completed, can not clear Manual data"),

    OrderUpLimit(301, "Order up limit"),
    PayFailed(302, "Order Pay Failed"),

    USERNAME_PASSWORD_INCORRECT(101, "Username password incorrect."),

    Unauthorized(401, "Unauthorized"),

    SessionExpired(402, "session expired"),

    SERVER_ERROR(406, "Server Error"),

    IllegalRequest(410, "Illegal Request"),

    SERVICE_DEGRADE(666, "service degrade"),

    FrequentRequest(411, "Frequent requests"),

    NetworkError(412, "Network error"),

    UploadFailed(413, "Upload Failed"),

    OssFailed(414, "Oss Failed"),

    NotFoundEventFailed(415, "Not found event failed"),

    NotFoundContestFailed(416, "Not found contest failed"),

    DegradeError(417, "Request is too large"),

    IllegalOperation(418, "Illegal operation"),

    SQUAD_CHECK_ERROR(1001, "Squad check error"),

    ;

    private final int code;

    private final String msg;
    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
